<?php
// Template Name: Register
// set a redirect for after logging in
if (isset($_REQUEST['redirect_to']))
    $redirect = $_REQUEST['redirect_to'];

if (!isset($redirect))
    $redirect = home_url();

$show_password_fields = apply_filters('show_password_fields_on_registration', true);
?>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<script>
    var $ = jQuery;
    $(document).ready(function(){
        $("#radio" ).buttonset();    
    });
    
</script>

<div class="content">

    <div class="content_botbg">

        <div class="content_res">

            <!-- full block -->
            <div class="shadowblock_out">

                <div class="shadowblock">

                    <h2 class="dotted"><span class="colour"><?php _e('Đăng kí', APP_TD); ?></span></h2>

                    <?php do_action('appthemes_notices'); ?>

                    <p><?php _e('Đăng kí thành viên để có thể nhận được những thông tin bổ ích nhất', APP_TD); ?></p>

                    <div class="left-box">

                        <?php if (get_option('users_can_register')) : ?>

                            <form action="<?php echo appthemes_get_registration_url(); ?>" method="post" class="loginform" name="registerform" id="registerform">

                                <p>
                                    <label for="user_login"><?php _e('Tên hiển thị:', APP_TD); ?></label>
                                    <input tabindex="1" type="text" class="text required" name="user_login" id="user_login" value="<?php if (isset($_POST['user_login']))
                            echo esc_attr(stripslashes($_POST['user_login'])); ?>" />
                                </p>

                                <p>
                                    <label for="user_email"><?php _e('Email:', APP_TD); ?></label>
                                    <input tabindex="2" type="text" class="text required email" name="user_email" id="user_email" value="<?php if (isset($_POST['user_email']))
                                           echo esc_attr(stripslashes($_POST['user_email'])); ?>" />
                                </p>
                                <p>
                                    <label for="user_email"><?php _e('Bạn là:', APP_TD); ?></label>
                                <div id="radio">
                                    <input type="radio" id="radio1" name="radio" checked="checked"/><label for="radio1">Chủ Shop</label>
                                    <input type="radio" id="radio3" name="radio" /><label for="radio3">Bình thường</label>
                                </div>
                                </p>
                                <p>
                                    <label for="pass1"><?php _e('Password:', APP_TD); ?></label>
                                    <input tabindex="3" type="password" class="text required" name="pass1" id="pass1" value="" autocomplete="off" />
                                </p>

                                <p>
                                    <label for="pass2"><?php _e('Password Again:', APP_TD); ?></label>
                                    <input tabindex="4" type="password" class="text required" name="pass2" id="pass2" value="" autocomplete="off" />
                                </p>

                                <div class="strength-meter">
                                    <div id="pass-strength-result" class="hide-if-no-js"><?php _e('Strength indicator', APP_TD); ?></div>
                                    <span class="description indicator-hint"><?php _e('Hint: The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers and symbols like ! " ? $ % ^ &amp; ).', APP_TD); ?></span>
                                </div>

                                <?php do_action('register_form'); ?>

                                <div id="checksave">

                                    <p class="submit">
                                        <input tabindex="6" class="btn_orange" type="submit" name="register" id="register" value="<?php _e('Create Account', APP_TD); ?>" />
                                    </p>

                                </div>

                                <input type="hidden" name="redirect_to" value="<?php echo esc_attr($redirect); ?>" />

                                <!-- autofocus the field -->
                                <script type="text/javascript">try{document.getElementById('user_login').focus();}catch(e){}</script>

                            </form>

                        <?php else : ?>

                            <p><?php _e('** User registration is currently disabled. Please contact the site administrator. **', APP_TD); ?></p>

                        <?php endif; ?>

                    </div>

                    <div class="right-box">

                    </div><!-- /right-box -->

                    <div class="clr"></div>

                </div><!-- /shadowblock -->

            </div><!-- /shadowblock_out -->

        </div><!-- /content_res -->

    </div><!-- /content_botbg -->

</div><!-- /content -->
